<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'video-form',
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
            ));
    ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>

        <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'idGalleria'); ?>
        <?php
        $galleria = $model->Galleria;
        if (!isset($model->Galleria))
            $galleria = Galleria::model()->findByPk($_GET['idGalleria']);
        echo CHtml::encode($galleria->title);
        ?>

    </div>
    <div class="row">
<?php echo $form->labelEx($model, 'title'); ?>
<?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 1000)); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'descr'); ?>
<?php echo $form->textField($model, 'descr', array('size' => 60, 'maxlength' => 21844)); ?>
        <?php echo $form->error($model, 'descr'); ?>
    </div>

    <div class="row">
<?php echo $form->labelEx($model, 'link'); ?>
<?php echo $form->textField($model, 'link', array('size' => 60, 'maxlength' => 1000)); ?>
<?php echo $form->error($model, 'link'); ?>
    </div>

    <div class="row" id="video">
        <b><?php echo "File" ?></b>
        <?php
        $this->widget('CMultiFileUpload', array(
            'name' => 'videos',
            'accept' => 'mpeg|mp4|avi|flv|txt', // useful for verifying files
            //'duplicate' => 'File duplicato!', // useful, i think
            'denied' => 'Estensione non supportata', // useful, i think
            'max' => 1
        ));
        ?>
    </div>
    

    <div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->